/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = { };

  // 用于cookie签名密钥，应改为您自己的并保持安全
  config.keys = appInfo.name + '_1571975369430_1759';

  // 在这里添加用户配置
  const userConfig = {
    SWTC:{
      walletFrom:{
        "address": "j91rCu1FbLkBzVmXEtwzeD6j1rPSczW4i1",
        "secret": "spyKtRV26jTsEb3JmBfVUfVYZKnsf",
      },
      walletTo:{
        "address": "jwoHSgdQt7wMQASqAQmswVNxfjbQTTWf6g",
        "secret": "ssNKDxffZ55mHZtZ4szvM619HXSxj",
      },
    }
  };

  // MySql 数据库连接
  config.sequelize = {
    host: '127.0.0.1',
    port: 3306,
    password: '111aaa',
    database: 'db_jingtong_epidemic_demo',
  };

  // redis相关配置
  config.redis = {
    client: {
      port: 6379,
      host: '127.0.0.1',
      password: '',
      db: 0,
    },
  };

  return {
    ...config,
    ...userConfig,
  };
};
